;(function(modules){
    function require(id){
    
        const [fn,mapping] = modules[id]
    
        const module = {
            exports: {},
        }

        function localReuire(filePath){
            const id = mapping[filePath]
            return require(id)
        }
        fn(localReuire, module, module.exports)
    
        return module.exports;
    }
    require(1)
})({
    1:[function mainjs(require, module, exports){
        // mainjs
        const {foo} = require("./foo.js")
        foo()
        console.log("main.js")
    },{"./foo.js": 2}],
    2:[function foojs(require, module, exports){
        // foojs
        function foo() {
            console.log("foo");
        }
        foo()
        module.exports = {
            foo,
        }
    },{}]
})